// file : udptunnel_api.h
// auth : lagula
// date : 2013-5-14
// desc : declare functions defined in updtunnel_api.c
//

#include <pthread.h>

// structure of udptunnel client type
struct udptc_t
{
	pthread_t i_tid;

	int i_unreliable;
	char psz_localhost[128];
	char psz_localport[6];
	char psz_proxyhost[128];
	char psz_proxyport[6];
	char psz_remotehost[128];
	char psz_remoteport[6];
};

typedef struct udptc_t udptc_t;


udptc_t *udptunnel_client_setup( int i_unreliable,
								const char *psz_localhost, int i_localport,
								const char *psz_proxyhost, int i_proxyport,
								const char *psz_remotehost, int i_remoteport );

int udptunnel_client_teardown( udptc_t *p_obj );

// param can only be "4" or "6", means IPv4 or IPv6. The default is IPv4.
// If you want to use IPv6, call this function.
int udptunnel_client_setIPVersion( const char *psz_ipver );

int udptunnel_client_setDebugLevel( int level );

